package org.apnprovider.config;
import java.util.Map;
import java.util.Properties;
import org.apnprovider.Configuration;

/**
 * Trivial implementation of {@link Configuration} interface
 * 
 * @see Configuration
 * 
 * @author Alexey Palamarchuk (slonnik@gmail.com)
 *
 */
public class ConfigurationTrivial implements Configuration{

	/** properties*/
	private final Properties properties = new Properties();
	
	public ConfigurationTrivial(Map<String, String> properties)
	{
		this.properties.putAll(properties);
	}
	
	@Override
	public String get(String key) {
		return properties.getProperty(key);
	}

	@Override
	public String get(String key, String defValue) {
		return properties.getProperty(key, defValue);
	}

}
